<template>
  <div class="w-full phoneMenu bg-[#0f212e]">
    <menuPhone></menuPhone>
  </div>
</template>

<script setup>
import { defineAsyncComponent, onMounted, watch, onUnmounted } from "vue";
import { mainAct } from "@/store/activeda";
import { useRouter } from "vue-router";
const main = mainAct();
const router = useRouter();
const menuPhone = defineAsyncComponent(() =>
  import("../../components/menu/index.vue")
);

onMounted(() => {
  scrollListener();

  window.addEventListener("orientationchange", function (event) {
    if (screen.orientation.angle === 90 || screen.orientation.angle === -90) {
      // 横屏
      console.log("横屏");
    } else {
      console.log("竖屏");
      // 竖屏
    }
  });
});

let scrollListener = () => {
  window.scrollTo(0, 0);
};
</script>

<style scoped>
.phoneMenu {
  width: 100%;
  height: calc(100svh - 128px);
  background: #0f212e;
}
</style>
